<template>
  <div>
    <h1>第一个组件,{{ num }}</h1>
    <button @click="handleNum">+</button>
  </div>
</template>

<script>
  //选项式API
  export default {
    data() {
      return {
        num: 100
      }
    },
    methods: {
      handleNum() {
        this.num++
      }
    },
  }
</script>

<style lang="scss" scoped>
h1{
  color: orange;
}
</style>